package com.df.excel_export.common;

public class Constant {
    public static class config{
        public static final   String KEY_excelFilePath = "excel_file_path";
        public static final String KEY_DataStartRow = "data_start_row";
        public static final String KEY_ExportFiles = "export_files";
        public static final String KEY_TablePrefix = "table_prefix";//解析的表单名前缀
        public static final String KEY_TableSuffix = "table_suffix";//解析的表单名后缀
        public static final String KEY_ClassNameContainPrefix = "className_containPrefix";//类名是否包含前缀
        public static final String KEY_ClassNameContainSuffix = "className_containSuffix";//类名是否包含后缀
        public static final String KEY_ScriptType = "lifecycle_script_type";//脚本类型配置键
        public static final String KEY_JsEngine = "lifecycle_js_engine";//脚本类型配置键
        public static final String KEY_ScriptLocation = "lifecycle_script_location";//脚本位置
        public static final String Location_Prefix = "app:";//导表工具根目录对应的前缀
        public static final String Key_TagPrefix = "tag_";//tag枚举类生成模板
        public static final String Key_TagSuffix_TemplateFolder = "_template_folder";//枚举文件夹
        public static final String Key_TagSuffix_EnumTemplateFile = "_enum_template_file";//tag枚举类生成模板
        public static final String Key_TagSuffix_EnumExportPath = "_enum_export_path";//tag枚举类代码生成位置
        public static final String Key_TagSuffix_EnumExportFileSuffix = "_enum_export_file_suffix";//tag枚举类代码生成文件后缀
        public static final String Key_TagSuffix_EntityTemplateFile= "_entity_template_file";//实体类生成模板
        public static final String Key_TagSuffix_EntityExportPath = "_entity_export_path";//实体类生成路径
        public static final String Key_TagSuffix_EntityExportFileSuffix = "_entity_export_file_suffix";//tag实体类代码生成文件后缀
        public static final String Key_TagSuffix_DataExportType= "_data_export_type";//tag数据导出类型
        public static final String Key_TagSuffix_DataExportPath = "_data_export_path";//tag数据导出路径
        public static final String Key_TagSuffix_DataExportFileSuffix = "_data_export_file_suffix";//tag数据导出文件后缀



        //表头一行，tag至少一个，数据校验规则一行，所以数据最低从第4行开始
        public static final int VALUE_DataStartRow_Min = 4;
    }


    /**
     * 支持的字段类型：字符串，int,long
     */
    public static class FieldType{
        public  static final String TYPE_String = "str";
        public  static final String TYPE_StringArray = "str[]";
        public  static final String TYPE_StringDbArray = "str[][]";

        public  static final String TYPE_Int = "int";
        public  static final String TYPE_IntArray = "int[]";
        public  static final String TYPE_IntDbArray = "int[][]";

        public  static final String TYPE_Long = "long";
        public  static final String TYPE_LongArray = "long[]";
        public  static final String TYPE_LongDbArray = "long[][]";

        public  static final String TYPE_Baifenbi = "int%";
        public  static final String TYPE_Wanfenbi = "int%%";
        public  static final String TYPE_Boolean = "bool";

        //枚举
    }

    public static class ScriptType{
        public  static final String TYPE_Js = "js";
        public  static final String TYPE_Groovy = "groovy";
        public  static final String TYPE_Python = "tython";
        public  static final String TYPE_None = "none";

    }

    public static class HTableHeaderDefine{
        public  static final String Header_FieldName = "field_name";
        public  static final String Header_FieldType = "field_type";
        public  static final String Header_Group = "group";
        public  static final String Header_Validators = "validators";
        public  static final String Header_FieldDesc = "field_desc";

    }
    public static class EnumValidateType{
        public static final String  TYPE_Name = "name";
        public static final String  TYPE_Value = "value";
        public static final String  TYPE_Desc = "desc";
    }
    public static class EnumTag{
        public static final String  Tag_All = "all";
    }

    public static class ValidateMark{
        public static final String  MARK_DefaultStart = "default(";
        public static final String  MARK_CircleEnd = ")";
        public static final String  MARK_RangeStart = "range(";
        public static final String  MARK_EnumStart = "@@(";
        public static final String  MARK_EnumName = "name";
        public static final String  MARK_EnumValue = "value";
        public static final String  MARK_EnumDesc = "desc";
        public static final String  MARK_TableStart = "@(";
        public static final String  MARK_LenStart = "len(";
        public static final String  MARK_OneListStart = "[";
        public static final String  MARK_OneListEnd = "]";
        public static final String  MARK_And = "&";
        public static final String  MARK_Any = "?";
        public static final String  MARK_Sharp = "#";
        public static final String  MARK_IndexSeperator = ",";
        public static final String  MARK_IndexRange = "-";
        public static final String  MARK_DbListStart = "{";
        public static final String  MARK_DbListEnd = "}";

    }

    public static  class CommonRegex{
        public static final String  REGEX_Number = "^[0-9]+$";
    }

    public static class Engine{
        public static final String  ENGINE_JS_Nashorn = "nashorn";
        public static final String  ENGINE_JS_V8 = "v8";
    }

    public static class ConfigPath{
        public static final String  TagConfig = "tag_config/tag_config.yml";
        public static final String  BaseConfig = "base_config/base_config.yml";
        public static final String  EnumDefineConfig = "enum_define/enum_define.yml";
        public static final String  ScriptEditorConfig = "script_editor";
        public static final String  TemplateManagerConfig = "template_manager";
    }

    public static class TableType{
        public static final String  Horizontal = "h";//横表
        public static final String  Vertical = "v";//竖表（主键为字符串，一般为全局表，类型定义表(属性类型定义表)？）
    }

    public static class ExportToolDataType{
        public static final String  TYPE_Int = "int";
        public static final String  TYPE_Long = "long";
        public static final String  TYPE_String = "string";
    }
}
